#ifndef TRACKTOROUTEDIALOG_H
#define TRACKTOROUTEDIALOG_H

#include <QDialog>
#include <QFileDialog>
#include <QDesktopServices>
#include <QUrl>
#include <QMessageBox>
#include "point.h"
#include "route.h"
#include "geocaching.h"

// Диалоговое окно "Преобразование трека в маршрут".

namespace Ui {
class TrackToRouteDialog;
}

class TrackToRouteDialog : public QDialog
{
    Q_OBJECT

public:
    explicit TrackToRouteDialog(Geocaching*, const unsigned long&, QWidget *parent = 0);
    ~TrackToRouteDialog();
    bool Result(Route*, bool&) const;
private:
    Ui::TrackToRouteDialog *ui;
    Geocaching *myProg;
    unsigned long trackID;
    QList <Point> formPointList;
    bool IsEnabledToSave(void) const;
private slots:
    void on_linkfileButton_clicked();
    void on_deleteFileButton_clicked();
    void on_addPointButton_clicked();
    void on_removePointButton_clicked();
    void on_upPointButton_clicked();
    void on_downPointButton_clicked();
    void on_routeNameLineEdit_textChanged(const QString &arg1);
    void on_pointFindLineEdit_returnPressed();
    void on_fileListWidget_doubleClicked(const QModelIndex &index);
    void on_allPointListWidget_currentRowChanged(int currentRow);
    void on_routePointListWidget_currentRowChanged(int currentRow);
    void on_saveButton_clicked();
};

#endif // TRACKTOROUTEDIALOG_H
